package com.future.orm.session;

/**
 * 默认SqlSession工厂实现类
 *
 * @author shiyong
 * 2020/5/20 10:40
 */
public class DefaultSqlSessionFactory implements SqlSessionFactory {

    private Configuration configuration;

    public DefaultSqlSessionFactory(Configuration configuration) {
        this.configuration = configuration;
    }

    /**
     * 获取SqlSession
     *
     * @return com.study.orm.session.SqlSession
     * @author shiyong
     * 2020/5/20 10:23
     */
    @Override
    public SqlSession openSession() {
        return new DefaultSqlSession(configuration);
    }
}
